<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="../../META-INF/resources/css/thycss.css" th:href="@{/css/thycss.css}"/>
    <script src="../../META-INF/resources/js/jquery-2.1.1.min.js" th:src="@{/js/jquery-2.1.1.min.js}"></script>
    <script th:inline="javascript">
        $(function () {
            var companyName = /*[[${company}]]*/ '';
            $("#companyName").html(companyName);
        })
    </script>
</head>
<body>
<div th:include="/include/header::head">

</div>

<p>公司：<span th:text="${company}"></span></p>
<p th:inline="text">公司：[[${company}]]</p>
<p> 公司：<span id="companyName"></span></p>
<div th:object="${clazz}" style="display: inline-block;width: 400px">
    班级：<span th:text="*{clazzName}"></span> 班号：<span th:text="*{clazzNo}"></span> 是否优秀班级：<span
        th:if="*{excellent}">是</span> <span th:unless="*{excellent}">否</span>
    <p style="margin: auto">班级人员</p>
    <div>遍历用法一：
        <table>
            <tr>
                <td>学号</td>
                <td>姓名</td>
                <td>性别</td>
                <td>年龄</td>
                <td>生日</td>
            </tr>
            <tr th:each="student : *{students}" th:object="${student}" th:class="${studentStat.odd}?'odd':'even'">
                <td th:text="*{stuNo}"></td>
                <td th:text="*{name}"></td>
                <td th:text="*{sex}"></td>
                <td th:text="*{age}"></td>
                <td th:text="*{#dates.format(birthDay,'yyyy-MM-dd HH:mm:ss')}"></td>
            </tr>
        </table>
    </div>

</div>
<div style="display: inline-block;width: 400px">
    遍历用法二：
    <table>
        <tr>
            <td>学号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>年龄</td>
            <td>生日</td>
        </tr>
        <tr th:each="student,row : ${clazz.students}" th:class="${row.odd}?'odd':'even'">
            <td th:text="${student.stuNo}"></td>
            <td th:text="${student.name}"></td>
            <td th:text="${student.sex}"></td>
            <td th:text="${student.age}"></td>
            <td th:text="${#dates.format(student.birthDay,'yyyy-MM-dd HH:mm:ss')}"></td>
        </tr>
    </table>
</div>
<div th:include="/include/footer::#foot"></div>
</body>
</html>